`ifndef __ISE__

`include "code\source\P2\channel_encoder.v"
`include "code\source\P2\channel_decoder.v"

`endif

module channel (
           input clk,
           input clk2,
           input rst_n,
           input din,
           input din_valid,
           output dout,
           output dout_valid);

wire encoder_dout, encoder_valid;

channel_encoder Channel_encoder(
                    .clk (clk ),
                    .clk2 (clk2 ),
                    .rst_n (rst_n ),
                    .din (din ),
                    .din_valid (din_valid ),
                    .dout (encoder_dout ),
                    .dout_valid (encoder_valid )
                );

channel_decoder Channel_decoder(
                    .clk (clk ),
                    .clk2 (clk2 ),
                    .rst_n (rst_n ),
                    .din (encoder_dout ),
                    .din_valid (encoder_valid ),
                    .dout (dout ),
                    .dout_valid (dout_valid )
                );

endmodule
